<script setup lang="ts">
	import { ref } from "vue";
	import {
		onShow,
		onHide,
		onLoad
	} from '@dcloudio/uni-app';
	import {
		getCurrentInstance
	} from 'vue'
	import {
		useRouter
	} from 'uni-mini-router'
	import {
		userStore
	} from '@/pinia';
	const userStoreInfo = userStore();
	const {
		proxy,
	} = getCurrentInstance()
	let router = useRouter()
	let status = ref('支付成功')
	let backNum = ref(1)
	onLoad((option) => {
		status.value = option.status
		backNum.value = option.backNum
	})
	const backPage = () => {
		uni.navigateBack({
			delta: backNum.value
		})
	}
</script>
<template>
	<view class="success c-flex-center-center">
		<image src="../../static/icon/success.png" mode=""></image>
		<text>{{ status }}</text>
	</view>
	<view class="btnBox r-flex-around-center">
		<text @click="backPage">返回首页</text>
	</view>
</template>
<style lang="scss">
	.success {
		width: 100%;
		margin: 200rpx 0 0;

		image {
			width: 200rpx;
			height: 200rpx;
			margin-bottom: 20rpx;
		}
	}

	.btnBox {
		margin-top: 100rpx;

		text {
			padding: 10rpx 50rpx;
			border: 1rpx solid #CA655E;
			border-radius: 10rpx;
			color: #CA655E;
		}
	}
</style>